<%@page import="helpers.StringHelper"%>
<%@page import="java.util.TreeMap"%>
<%@page import="java.util.Map"%>
<%@page import="entities.MetaSeo"%>
<%@page import="systems.ConfigSystem"%>
<%@page import="entities.SiteConfig"%>
<%@page import="helpers.LanguageHelper"%>
<%@page import="helpers.UrlHelper"%>
<%
SiteConfig siteConfig = ConfigSystem.getConfigs();
String article = (String) request.getAttribute("article");
String rewrite = (String) request.getAttribute("rewrite");

MetaSeo metaseo = (MetaSeo) request.getAttribute("metaseo");

//Set content for Seo
Map<String, String> replates = new TreeMap<String, String>();
replates.put("__SERVER_NAME__", UrlHelper.getDomainServer(request));
replates.put("__SERVER_URL__", UrlHelper.getServerUrl(request));

String title = StringHelper.replateContent(metaseo.getTitle(), replates);
String description = StringHelper.replateContent(metaseo.getDescription(), replates);
String keywords = StringHelper.replateContent(metaseo.getKeywords(), replates);
String url = StringHelper.replateContent(metaseo.getOgurl(), replates);
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/templates/ezsarticle/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>

		<div class="row-fluid">
			<div class="span8">
				<div class="block">
					<h3 class="title">Article rewriter</h3>
					<p>Article rewriter tool specialists rewrite the article (copy - duplicate content) into a unique article content (for google). It will change some words, phrases ... so that the content is constant but it's a unique content article after rewritable. We built this tool for that purpose. We hope give a useful tool to communities SEOer and online marketers. Unique content is the King.</p>
					
					<form method="post" action="">
						<label>Original Article (required)</label>
						<textarea name="article" rows="8" class="input-xxlarge"><%=article %></textarea>
						<div class="clearfix">
							<input type="submit" class="btn btn-success" value="Rewrite" tabindex="5" id="submit" name="submit">
							<p></p>
						</div>
						<label>Rewritten Article</label>
						<textarea rows="8" class="input-xxlarge" readonly="readonly"><%=rewrite %></textarea>
					</form>
				</div>
			</div>
			
			<jsp:include page="/templates/ezsarticle/elements/right.jsp" />
			
		</div>

<jsp:include page="/templates/ezsarticle/layouts/footer.jsp" />